-- GENERATED SPELL FOR [Vilebranch Soul Eater] --


function spell0_2647(pUnit, Event) --@Dark Offering,Heal--
pUnit:FullCastSpellOnTarget(7154,pUnit)
pUnit:RegisterEvent('Sorts_2647', 0, 1)
end

function spell1_2647(pUnit, Event) --@Soul Bite,n/a--
pUnit:FullCastSpellOnTarget(11016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2647', 2000, 1)
end

function Sorts_2647(pUnit, Event)
local choix_sorts_2647 = math.random(0, 1)
if choix_sorts_2647 == 0 then
pUnit:RegisterEvent('spell0_2647', 1, 1)
end
if choix_sorts_2647 == 1 then
pUnit:RegisterEvent('spell1_2647', 1, 1)
end
end

function mob2647_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2647', math.random(1500, 3000), 1)
end

function mob2647_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2647_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2647_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2647, 1, 'mob2647_Action')
RegisterUnitEvent(2647, 2, 'mob2647_Leave')
RegisterUnitEvent(2647, 3, 'mob2647_Kill')
RegisterUnitEvent(2647, 4, 'mob2647_Die')
